import request from '@/utils/request'

const bannerApi = {
  list: '/banner/list',
  creat: '/banner/add',
  edit: '/banner/change',
  Delete: '/banner/delete',
}

/**
 * bannerList func
 * parameter: {
 *     username: '',
 *     password: '',
 *     captcha: '12345'
 * }
 * @param parameter
 * @returns {*}
 */
// 获取banner列表
export function bannerList (parameter) {
  return request({
    url: bannerApi.list,
    method: 'get',
		headers: {
		  'Content-Type': 'application/json;charset=UTF-8'
		},
    params: parameter,
  })
}
// 创建banner
export function bannerCreat (parameter) {
  return request({
    url: bannerApi.creat,
    method: 'post',
		headers: {
		  'Content-Type': 'application/json;charset=UTF-8'
		},
    params: parameter,
  })
}
// 编辑banner
export function bannerEdit (parameter) {
  return request({
    url: bannerApi.edit,
    method: 'post',
		headers: {
		  'Content-Type': 'application/json;charset=UTF-8'
		},
    params: parameter,
  })
}
// 删除banner
export function bannerDelete (parameter) {
  return request({
    url: bannerApi.Delete,
    method: 'post',
		headers: {
		  'Content-Type': 'application/json;charset=UTF-8'
		},
    params: parameter,
  })
}

